﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace HigLabo.Net.WindowsLive
{
    /// <summary>
    /// 
    /// </summary>
    public class ContactEmailHashes
    {
        private List<String> _ContactEmailHashes = new List<String>();
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonText"></param>
        public ContactEmailHashes(String jsonText)
        {
            this.SetProperty(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonText"></param>
        public void SetProperty(String jsonText)
        {
            var cc = JsonConvert.DeserializeObject(jsonText) as JContainer;

            foreach (var s in WindowsLiveClient.CreateJsonTextList(cc))
            {
                _ContactEmailHashes.Add(s);
            }
        }
    }
}
